Someone acting as the representative of an organisation, country etc.
Specifically, the representative of a British colony (or, later, of a Canadian province or Australian state) in London or another foreign city.